var t = require("../../../@babel/runtime/helpers/interopRequireDefault"), a = require("../../../@babel/runtime/helpers/toConsumableArray"), e = t(require("../../../utils/util.js")), o = getApp();

Page({
    data: {
        classifyBol: !0,
        goodsInfoList: []
    },
    onLoad: function(t) {
        this.getActivityInfo(), this.getGoodsInfo();
    },
    classifyBolbtn: function() {
        console.log(this.data.classifyBol), this.setData({
            classifyBol: !this.data.classifyBol
        });
    },
    gotoSearch: function() {
        wx.navigateTo({
            url: "/packageB/member/category/search_v2/search_v2?fromPage=1&&kind=POrder"
        });
    },
    goback: function(t) {
        wx.navigateBack({
            delta: 2
        });
    },
    onReady: function() {},
    onShow: function() {},
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {},
    onShareAppMessage: function() {},
    getActivityInfo: function() {
        var t = this, a = o.getNetAddresss("plugin.pending-order.frontend.wholesale-area.index");
        o._getNetWork({
            url: a,
            success: function(a) {
                var o = a.data;
                1 == o.result && (console.log(o), t.setData({
                    activity: o.data.activity,
                    activity_time: o.data.activity.end_time
                }), Date.parse(e.default.formatTime(new Date())) > Date.parse(t.data.activity_time.replace(/-/g, "/")) ? t.setData({
                    isfot: !1
                }) : t.setData({
                    isfot: !0
                }));
            },
            fail: function(t) {
                console.log(t);
            }
        });
    },
    getGoodsInfo: function() {
        var t = this, e = o.getNetAddresss("plugin.pending-order.frontend.wholesale-area.goods-list");
        o._getNetWork({
            url: e,
            data: {
                page: 1
            },
            success: function(e) {
                var o = e.data;
                if (1 == o.result) {
                    console.log(o.data.data);
                    var n = t.data.goodsInfoList;
                    n.push.apply(n, a(o.data.data)), t.setData({
                        goods: n
                    });
                }
            },
            fail: function(t) {
                console.log(t);
            }
        });
    }
});